package com.ssmTest.service.impl;

import com.ssmTest.domian.Student;
import com.ssmTest.mapper.StudentMapper;
import com.ssmTest.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service("stuService")
@Transactional
public class StudentServiecImpl implements StudentService {
    @Autowired
    private StudentMapper mapper;


    public List<Student> findAll() {
        return mapper.findAll();
    }

    public void add(Student student) {
        mapper.add(student);
    }

    public Student findOne(Integer id) {
        return mapper.findOne(id);
    }

    public void update(Student student) {
        mapper.update(student);
    }

    public void delete(Integer[] ids) {
        mapper.delete(ids);
    }
}
